package com.xgl.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * 学生参加活动信息
 * </p>
 *
 * @author 最最帅气的熊国林
 * @since 2021-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("s_grade")
@ApiModel(value="Grade对象", description="学生参加活动信息")
public class Grade implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "学号")
    @Excel(name = "学号")
    private String s_number;

    @ApiModelProperty(value = "姓名")
    @Excel(name = "姓名")
    private String name;

    @ApiModelProperty(value = "民族id")
    private Integer nationId;

    @ApiModelProperty(value = "性别")
    @Excel(name = "性别")
    private String sex;

    //id对应实质
    @ApiModelProperty(value = "民族")
    @TableField(exist = false)
    @ExcelEntity(name = "民族")
    private Nation nation;

    @ApiModelProperty(value = "学院")
    @TableField(exist = false)
    @ExcelEntity(name = "学院")
    private Department department;

    @ApiModelProperty(value = "专业")
    @TableField(exist = false)
    @ExcelEntity(name = "专业")
    private Major major;

    @ApiModelProperty(value = "所在年级")
    @Excel(name = "所在年级")
    private String grade;

    @ApiModelProperty(value = "专业id")
    private Integer majorId;

    @ApiModelProperty(value = "院系id")
    private Integer departmentId;

    @ApiModelProperty(value = "学历层次(本 = 1/专 = 0/硕 = 2/博 = 3)")
    @Excel(name = "学历层次")
    private String s_level;

    @ApiModelProperty(value = "学生类别")
    @Excel(name = "学生类别")
    private String s_category;

    @ApiModelProperty(value = "考试名称")
    @Excel(name = "考试名称")
    private String s_test;

    @ApiModelProperty(value = "考试时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @Excel(name = "考试时间",format = "yyyy-MM-dd",width = 20)
    private LocalDate test_time;

    @ApiModelProperty(value = "考试成绩")
    @Excel(name = "考试成绩")
    private String s_garde;

    @ApiModelProperty(value = "考试地点")
    @Excel(name = "考试地点")
    private String test_place;

    @ApiModelProperty(value = "Hash代码")
    private String hash_code;

    @ApiModelProperty(value = "上一个学生信息的hashcode")
    private String previousHash;


}
